//
//  teamRankCell.m
//  jiMuOperate
//
//  Created by 翁仪 on 16/5/7.
//  Copyright © 2016年 jinXinFengLi. All rights reserved.
//

#import "teamRankCell.h"
#import "JMOperate.pch"

@implementation teamRankCell{

    //头部视图
    UIView *_headView;

}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    
    if (self=[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self createViews];
        
    }
    return self;
}
-(void)createViews{
    // 头部间隔视图
    CGFloat cellH=55;
    CGFloat PadingW= 10;
    CGFloat PadingH= 8;
    UIView *headView =[ARC createViewWithFrame:CGRectMake(0, 0, 320, PadingH)];
   headView.backgroundColor = RGB(237, 238, 239);
    [self.contentView addSubview:headView];
     _headView = headView;
    // 排名
    UILabel *SortLabel = [ARC createLabelWithFrame:CGRectMake(PadingW,headView.frame.size.height, 30, cellH) Font:14 Text:@""];
        SortLabel.textColor = RGB(38, 38, 38);
    [self.contentView addSubview:SortLabel];
    _SortLabel = SortLabel;
    // 团队名称
    UILabel *nameLabel = [ARC createLabelWithFrame:CGRectMake(SortLabel.frame.origin.x+SortLabel.frame.size.width+PadingW, headView.frame.size.height, 150, 30) Font:14 Text:@""];
    nameLabel.textColor = RGB(38, 38, 38);
    nameLabel.textAlignment=NSTextAlignmentLeft;
    [self.contentView addSubview:nameLabel];
    _nameLabel = nameLabel;
    // 人数
    UILabel *NumbeLabel = [ARC createLabelWithFrame:CGRectMake(nameLabel.frame.origin.x, nameLabel.frame.origin.y+nameLabel.frame.size.height-5, 150, 20) Font:12 Text:@""];
    NumbeLabel.textColor = RGB(140, 140, 140);
        NumbeLabel.textAlignment=NSTextAlignmentLeft;
    [self.contentView addSubview:NumbeLabel];
    _NumbeLabel = NumbeLabel;
     // 收益数
    UILabel *SumProfitLabel = [ARC createLabelWithFrame:CGRectMake(200, headView.frame.origin.y+(nameLabel.frame.size.height+NumbeLabel.frame.size.height-9)/2, 150, 20) Font:11 Text:[NSString stringWithFormat:@""]];
    SumProfitLabel.textColor = RGB(76, 76, 76);
    SumProfitLabel.textAlignment=NSTextAlignmentLeft;
    [self.contentView addSubview:SumProfitLabel];
    _SumProfitLabel = SumProfitLabel;
    
   _headView.frame = [ToolViewAndData MyAutoLayoutOnlyWidth:_headView];
    _SortLabel.frame = [ToolViewAndData MyAutoLayoutOnlyWidth:_SortLabel];
    _nameLabel.frame = [ToolViewAndData MyAutoLayoutOnlyWidth:_nameLabel];

    _NumbeLabel.frame = [ToolViewAndData MyAutoLayoutOnlyWidth:_NumbeLabel];

    _SumProfitLabel.frame = [ToolViewAndData MyAutoLayoutOnlyWidth:_SumProfitLabel];
    UIImageView *lineImg = [[UIImageView alloc]initWithFrame:CGRectMake(0,60, 320, 1)];
    lineImg.image = [UIImage imageNamed:@"halvingline_2"];
    [self.contentView addSubview:lineImg];
    lineImg.frame = [ToolViewAndData MyAutoLayout:lineImg];
    
}

@end
